package com.zihan.service;

import com.zihan.domain.dto.ActivityDTO;
import com.zihan.domain.entity.Activity;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zihan.domain.result.PageResult;
import com.zihan.domain.result.Result;
import com.zihan.domain.vo.ActivityVO;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

/**
 * <p>
 * 学术活动表 服务类
 * </p>
 *
 * @author zhangzihan
 * @since 2025-10-17
 */
public interface IActivityService extends IService<Activity> {

    /**
     * 获取所有活动列表
     * @return
     */
    Result<PageResult> getList(ActivityDTO activityDTO);

    /**
     * 获取当前教师用户的活动列表
     */
    Result<PageResult> getCurrentTeacherList(ActivityDTO activityDTO);


    /**
     * 添加活动
     */
    Result<String> addActivity(Activity activity);


    /**
     * 查看活动详情
     * @param id
     * @return
     */
    Result<ActivityVO> detail(Long id);

    Result<String> updateActivity(Activity activity);

    /**
     * 删除活动
     * @param id
     * @return
     */
    Result<String> deleteActivity(Long id);

    // 报名活动
    Result<String> signUp(Long id);

    // 取消报名
    Result<String> cancelSignUp(Long id);

    // 导出预报
    void exportAnticipate(Long activity, HttpServletResponse response) throws IOException;

    Result<PageResult> getStudentList(ActivityDTO activityDTO);

    // 签到
    Result<String> checkIn(Long id);
}
